﻿using Orchard.ContentManagement;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace AdvancedPoll.Models
{
    public class PollPart : ContentPart<PollRecord>
    {
        [Required]
        public string Question
        {
            get { return Record.Question; }
            set { Record.Question = value; }
        }

        [Required]
        public DateTime? OpenDateUtc
        {
            get { return Record.OpenDateUtc; }
            set { Record.OpenDateUtc = value; }
        }

        [Required]
        public DateTime? CloseDateUtc
        {
            get { return Record.CloseDateUtc; }
            set { Record.CloseDateUtc = value; }
        }

        [Required]
        public int MaxVotes
        {
            get { return Record.MaxVotes; }
            set { Record.MaxVotes = value; }
        }

        [Required]
        public bool IsShown
        {
            get { return Record.Shown; }
            set { Record.Shown = value; }
        }
    }
}